package com.wh.wisdomsite.xbox.common.client;

import com.wh.wisdomsite.xbox.common.reponse.ErrorResponse;


/**
 * 客户端的响应接口实现
 * @Package com.wh.wisdomsite.xbox.common.client
 * @author 谢泽鹏
 * @date 2014年10月8日 下午4:02:14
 * @Copyright 个人版权所有
 * @Company 贵州万华科技有限公司Copyright (c) 2014
 * @version V1.0
 */
public class DefaultCompositeResponse<T> implements CompositeResponse {

    private boolean successful;

    private ErrorResponse errorResponse;

    private T successRopResponse;

    /**
     * 构造函数
     * @param successful
     */
    public DefaultCompositeResponse(boolean successful) {
        this.successful = successful;
    }

    public void setErrorResponse(ErrorResponse errorResponse) {
        this.errorResponse = errorResponse;
    }

    public void setSuccessRopResponse(T successRopResponse) {
        this.successRopResponse = successRopResponse;
    }

    @Override
    public ErrorResponse getErrorResponse() {
        return this.errorResponse;
    }


    @Override
    public T getSuccessResponse() {
        return this.successRopResponse;
    }


    @Override
    public boolean isSuccessful() {
        return successful;
    }
}

